package com.xiaohong.user.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import entity.Role;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema( name = "User")
public class User implements Serializable{

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @Schema(description = "id",accessMode = READ_ONLY)
	@JsonFormat(shape = JsonFormat.Shape.STRING)
	private Long id;//id

    @Schema(description = "密码，加密存储")
    @TableField("password")
	private String password;//密码，加密存储

    @Schema(description = "注册手机号")
    @TableField("phone")
	private String phone;//注册手机号

    @Schema(description = "注册邮箱")
    @TableField("email")
	private String email;//注册邮箱

    @Schema(description = "会员来源：1:PC，2：H5，3：Android，4：IOS")
    @TableField("source_type")
	private Integer sourceType;//会员来源：1:PC，2：H5，3：Android，4：IOS

    @Schema(description = "昵称")
    @TableField("nick_name")
	private String nickName;//昵称

    @Schema(description = "真实姓名")
    @TableField("name")
	private String name;//真实姓名

    @Schema(description = "使用状态（1正常 0非正常）")
    @TableField("status")
	private Integer status;//使用状态（1正常 0非正常）

    @Schema(description = "头像地址")
    @TableField("head_pic")
	private String headPic;//头像地址

    @Schema(description = "QQ号码")
    @TableField("qq")
	private String qq;//QQ号码

    @Schema(description = "手机是否验证 （0否  1是）")
    @TableField("is_mobile_check")
	private Integer isMobileCheck;//手机是否验证 （0否  1是）

    @Schema(description = "邮箱是否检测（0否  1是）")
    @TableField("is_email_check")
	private Integer isEmailCheck;//邮箱是否检测（0否  1是）

    @Schema(description = "性别，1男，0女")
    @TableField("sex")
	private Integer sex;//性别，1男，0女

    @Schema(description = "会员等级")
    @TableField("user_level")
	private Integer userLevel;//会员等级

    @Schema(description = "积分")
    @TableField("points")
	private Integer points;//积分

    @Schema(description = "经验值")
    @TableField("experience_value")
	private Integer experienceValue;//经验值

    @Schema(description = "出生年月日")
    @TableField("birthday")
	private Date birthday;//出生年月日

    @Schema(description = "最后登录时间")
    @TableField("last_login_time")
	private Date lastLoginTime;//最后登录时间

    @Schema(description = "最后登录IP")
    @TableField("last_login_IP")
	private String lastLoginIP;//最后登录IP

    @Schema(description = "用户权限")
    @TableField("authorities")
	private String authorities;//用户权限

    @Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
    @TableLogic
	private Integer deleted;//逻辑删除标志

    @Schema(description = "创建时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private Date gmtCreate;//创建时间

    @Schema(description = "更改时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private Date gmtModified;//更改时间

    @Schema(description = "乐观锁",accessMode = READ_ONLY)
    @Version
	private Integer version;//乐观锁

	@Schema(description = "未授权的权限列表",accessMode = READ_ONLY)
	@TableField(exist = false)
	private List<String> unAuthorize; // 未授权的权限列表

	public List<String> getUnAuthorize() {
		return unAuthorize;
	}

	public void setUnAuthorize(List<String> unAuthorize) {
		this.unAuthorize = unAuthorize;
	}

	//get方法
	public Long getId() {
		return id;
	}

	//set方法
	public void setId(Long id) {
		this.id = id;
	}
	//get方法
	public String getPassword() {
		return password;
	}

	//set方法
	public void setPassword(String password) {
		this.password = password;
	}
	//get方法
	public String getPhone() {
		return phone;
	}

	//set方法
	public void setPhone(String phone) {
		this.phone = phone;
	}
	//get方法
	public String getEmail() {
		return email;
	}

	//set方法
	public void setEmail(String email) {
		this.email = email;
	}
	//get方法
	public Integer getSourceType() {
		return sourceType;
	}

	//set方法
	public void setSourceType(Integer sourceType) {
		this.sourceType = sourceType;
	}
	//get方法
	public String getNickName() {
		return nickName;
	}

	//set方法
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	//get方法
	public String getName() {
		return name;
	}

	//set方法
	public void setName(String name) {
		this.name = name;
	}
	//get方法
	public Integer getStatus() {
		return status;
	}

	//set方法
	public void setStatus(Integer status) {
		this.status = status;
	}
	//get方法
	public String getHeadPic() {
		return headPic;
	}

	//set方法
	public void setHeadPic(String headPic) {
		this.headPic = headPic;
	}
	//get方法
	public String getQq() {
		return qq;
	}

	//set方法
	public void setQq(String qq) {
		this.qq = qq;
	}
	//get方法
	public Integer getIsMobileCheck() {
		return isMobileCheck;
	}

	//set方法
	public void setIsMobileCheck(Integer isMobileCheck) {
		this.isMobileCheck = isMobileCheck;
	}
	//get方法
	public Integer getIsEmailCheck() {
		return isEmailCheck;
	}

	//set方法
	public void setIsEmailCheck(Integer isEmailCheck) {
		this.isEmailCheck = isEmailCheck;
	}
	//get方法
	public Integer getSex() {
		return sex;
	}

	//set方法
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	//get方法
	public Integer getUserLevel() {
		return userLevel;
	}

	//set方法
	public void setUserLevel(Integer userLevel) {
		this.userLevel = userLevel;
	}
	//get方法
	public Integer getPoints() {
		return points;
	}

	//set方法
	public void setPoints(Integer points) {
		this.points = points;
	}
	//get方法
	public Integer getExperienceValue() {
		return experienceValue;
	}

	//set方法
	public void setExperienceValue(Integer experienceValue) {
		this.experienceValue = experienceValue;
	}
	//get方法
	public Date getBirthday() {
		return birthday;
	}

	//set方法
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	//get方法
	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	//set方法
	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	//get方法
	public String getLastLoginIP() {
		return lastLoginIP;
	}

	//set方法
	public void setLastLoginIP(String lastLoginIP) {
		this.lastLoginIP = lastLoginIP;
	}
	//get方法
	public String getAuthorities() {
		return authorities;
	}

	//set方法
	public void setAuthorities(String authorities) {
		this.authorities = authorities;
	}
	//get方法
	public Integer getDeleted() {
		return deleted;
	}

	//set方法
	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}
	//get方法
	public Date getGmtCreate() {
		return gmtCreate;
	}

	//set方法
	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}
	//get方法
	public Date getGmtModified() {
		return gmtModified;
	}

	//set方法
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	//get方法
	public Integer getVersion() {
		return version;
	}

	//set方法
	public void setVersion(Integer version) {
		this.version = version;
	}


}
